
var mongoose = require('mongoose'),
materializedPlugin=require('mongoose-materialized'),
Schema=mongoose.Schema;

var CateSchema=new Schema({//定义分类
    parentId:{type:String},
    title:{type:String},
    type:Number,  //1:新闻 2：上传 3：产品
    children:{type:Array}
});

CateSchema.plugin(materializedPlugin);
module.exports=mongoose.model('Cate',CateSchema,'cate');//Category